package ch5;

public class Zuoye4 {//求1-1000之间的数的和
    public static void main(String[] args) {
        int a = 0, b = 0;
        while (a <= 1000) {
            b = b + a;
            a++;
        }
        System.out.println(b);
    }
}
